home *** CD-ROM | disk | FTP | other *** search
/ PC Open 100 / PC Open 100 CD 1.bin / CD1 / INTERNET / WEBDESIGN / Tsw WebCoder / tswwebcoder5en.exe / {app} / data / tools / dialog_tr.xml < prev    next >
Encoding:
Extensible Markup Language  |  2004-04-09  |  4.6 KB  |  106 lines

  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <dialog width="430" height="310" caption="Table row">
  3.     <controls>
  4.         <panel name="mainpanel" caption="" align="alclient" bevelinner="bvnone" bevelouter="bvnone">
  5.             <label name="lblAlign" caption="Align" hint="Choose how your table should be aligned." width="42" height="13" top="16" left="8"/>
  6.             <label name="lblAlignVertical" caption="Vertical align" hint="Choose how your table should be aligned vertically." width="77" height="13" top="16" left="192"/>
  7.             <combobox name="comAlign" taborder="0" text="" hint="Choose how your table should be aligned." width="160" height="21" top="32" left="8">
  8.                 <items>
  9.                     left
  10.                     center
  11.                     right
  12.                     justify
  13.                     char
  14.                 </items>
  15.             </combobox>
  16.             <combobox name="comAlignVertical" taborder="1" text="" hint="Choose how your table should be aligned vertically." width="160" height="21" top="32" left="192">
  17.                 <items>
  18.                     top
  19.                     middle
  20.                     bottom
  21.                     baseline
  22.                 </items>
  23.             </combobox>
  24.             <coloredit name="cleColor" taborder="2" text="#000000" hint="Select a background color for your table. Will only be included if the above checkbox is checked." width="161" height="19" top="80" left="8"/>
  25.             <checkbox name="cbColor" caption="Background color" taborder="3" hint="Select a background color for your table. Will only be included if the above checkbox is checked." checked="0" width="121" height="14" top="64" left="8"/>
  26.         </panel>
  27.     </controls>
  28.     <dialogevents>
  29.         <event type="onclose" resulttype="ok">
  30.             StartCode := ('<tr');
  31.             If comAlign.Text <> '' then
  32.              StartCode := StartCode + ' align="'+comAlign.Text+'"';
  33.             If comAlignVertical.Text <> '' then
  34.              StartCode := StartCode + ' valign="'+comAlignVertical.Text+'"';
  35.             If cbColor.Checked then
  36.              StartCode := StartCode + ' bgcolor="'+cleColor.HTMLValue+'"';
  37.             
  38.               If edtCSSClass.Text <> '' then
  39.              StartCode := StartCode + ' class="'+edtCSSClass.Text+'"';
  40.               If edtCSSId.Text <> '' then
  41.                StartCode := StartCode + ' ID="'+edtCSSId.Text+'"';
  42.               If edtCSSStyle.Text <> '' then
  43.                StartCode := StartCode + ' style="'+edtCSSStyle.Text+'"';
  44.             for i := 0 to EventGrid.Count - 1 do
  45.               begin
  46.               if EventGrid.Rows[i].EditText <> '' then
  47.                StartCode := StartCode + ' ' + (EventGrid.Rows[i].Caption+'="' + EventGrid.Rows[i].EditText)+'"';
  48.              end;              
  49.             
  50.             StartCode := StartCode + '>';
  51.             EndCode := '</tr>';
  52.             
  53.             If cbMakeXHTMLCompliant.Checked then
  54.              StartCode := MakeXHTMLCompliant(StartCode, true);
  55.             If cbDoPHPEscape.Checked then
  56.              StartCode := DoPHPEscape(StartCode);         
  57.             // A little "hack" - WebCoder will set this, to let us know whether to update
  58.             // an existing tag, or insert a brand new one
  59.             If cbUpdateExistingTag.Checked then 
  60.              ReplaceTag(StartCode)
  61.             else 
  62.                InsertTags(StartCode, EndCode);   
  63.               
  64.         </event>
  65.         <event type="onshow">    
  66.             // Lets put the advanced panel in the right place
  67.             pnlAdvanced.Parent := MainPanel;
  68.             pnlAdvanced.Left := 8;
  69.             pnlAdvanced.Top := MainPanel.Height - 32;        
  70.             pnlAdvanced.Width := Self.Width - 36;
  71.             // Height of the panel will be set internally. Do we need to make the dialog higher to make room for the Advanced panel?
  72.             If pnlAdvanced.Height > 20 then
  73.              Self.Height := Self.Height + 200;
  74.         </event>
  75.         <event type="updatedialog">
  76.             // This event will be called when a user executes the "Edit current tag"-rightclick feature
  77.             // The entire selected tag will be passed as a parameter to this function, that should update
  78.             // the required fields of the dialog.
  79.             function UpdateDialog(Tag: string);
  80.              begin
  81.               
  82.               comAlign.Text := GetValueFromAttribute(Tag, 'align');
  83.               comAlignVertical.Text := GetValueFromAttribute(Tag, 'valign');
  84.               bgColor := GetValueFromAttribute(Tag, 'bgcolor');
  85.               If bgColor <> '' then
  86.                begin
  87.                 cleColor.SelColor := ConvertColor(bgColor);
  88.                 cbColor.Checked := true;
  89.                 end;              
  90.                              
  91.                 edtCSSClass.Text := GetValueFromAttribute(Tag, 'class');
  92.                 edtCSSId.Text := GetValueFromAttribute(Tag, 'id');
  93.                 edtCSSStyle.Text := GetValueFromAttribute(Tag, 'style');
  94.               for i := 0 to EventGrid.Count - 1 do
  95.                 begin
  96.                  EventVal := GetValueFromAttribute(Tag, Lowercase(EventGrid.Rows[i].Caption));
  97.                  If EventVal <> '' then
  98.                   EventGrid.Rows[i].EditText := EventVal;
  99.                end;  
  100.               cbDoPHPEscape.Checked := IsPHPEscaped(Tag);
  101.               cbMakeXHTMLCompliant.Checked := isXHTMLDocument();                            
  102.              end;
  103.         </event>
  104.     </dialogevents>
  105. </dialog>
  106.